package com.scc.leetcode.链表;

/** https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
 * @author yons
 *  4 --> 5 --> 1 --> 9 给 5这个节点
 */
public class _237_删除链表中的节点 {

    public void deleteNode(ListNode node) {
    	if (node == null || node.next == null) {
    		node = null;
    		return;
    	}
 
    	node.val = node.next.val;
    	node.next = node.next.next;
    	
    }
	
}
